import { io } from 'socket.io-client'
import { Istate } from "../../interface"
import wssurl from "../../util/wssurl"

const socket = io(wssurl(), {
  forceNew: true,
  transports: ["websocket"]
})

const state: Istate = {
  user: undefined,
  users: undefined,
  question: undefined,
  questionbank: undefined,
  activity: undefined,
  article: undefined,
  label: undefined,
  myuserquestion: undefined,
  socket,
  notice: undefined,
  science: false,
  time: Date.now(),
  myPractiseQuestion: undefined
}

export default state
